Skip to content

Conversation

@madebymozart
Copy link
Collaborator

This fixes a bug where the stream would not restart if MMAP setting was changed

@madebymozart madebymozart self-assigned this Jan 26, 2026
// If the performance mode has changed, or if MMAP is disabled but currently used,
bool isMMapGlobal = isMMapEnabled();
bool isMMapCurrentlyUsed = OboeExtensions::isMMapUsed(mAudioStream.get());
if (performanceMode != mLastPerformanceMode || (!isMMapGlobal && isMMapCurrentlyUsed)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may not be correct. If the mAudioStream is originally opened with mmap disabled and then the user reenable mmap, the stream should also be reopened.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, just added the fix by making it global

@madebymozart madebymozart merged commit 650dfef into main Jan 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants